<template> 

  <ContentWrap>
    <IFrame :src="src" />
  </ContentWrap>
</template>
<script setup lang="ts" name="InfraSwagger">
import * as Api from '@/api/userCenter/conf'

const loading = ref(true) // 是否加载中
const src = ref(import.meta.env.VITE_BASE_URL + '/doc.html') // Knife4j UI
// const src = ref(import.meta.env.VITE_BASE_URL + '/swagger-ui') // Swagger UI

/** 初始化 */
onMounted(async () => {
  try {
    const data = await Api.getConfigKey('url.swagger')
    if (data && data.length > 0) {
      src.value = data
    }
  } catch (t) {
    console.log(t, );
    loading.value = false 
  }  finally {
    loading.value = false
  }
})
</script>
